/*
 * @Author: lduoduo
 * @Date: 2021-04-01 18:12:08
 * @Last Modified by: lduoduo
 * @Last Modified time: 2021-04-23 18:36:43
 * 环境代理
 */

const envConfig = {
  dev: {
    target: 'https://t-api.duoduo.com',
    origin: 'https://t-h5.duoduo.com',
    method: 'post',
  },
  prod: {
    target: 'https://api.duoduo.com',
    origin: 'https://h5.duoduo.com',
    method: 'post',
  },
};

const getDomain = () => {
  const env = process.env.NODE_ENV || 'development';

  // return envConfig.prod;
  return envConfig[env] || envConfig.dev;
};

envConfig.getDomain = getDomain;

module.exports = envConfig;
